package com.javasm.crm.service.impl.productimpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.javasm.crm.domin.entity.productEntity.Color;
import com.javasm.crm.domin.entity.productEntity.GoodsInfo;
import com.javasm.crm.mapper.goodsmapper.ColorMapper;
import com.javasm.crm.mapper.goodsmapper.GoodsInfoMapper;
import com.javasm.crm.service.productservice.ColorService;
import com.javasm.crm.service.productservice.GoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

/**
 * @Author：zhangyang
 * @Version：1.0
 * @Date：2021/7/13-10:41
 * @desp:
 * @since:
 */
@Service
@Transactional
public class GoodsInfoServiceImpl extends ServiceImpl<GoodsInfoMapper,GoodsInfo> implements GoodsInfoService {
    @Autowired
    GoodsInfoMapper goodsInfoMapper;

    @Override
    public GoodsInfo findById(Serializable goodId) {
        return goodsInfoMapper.selectById(goodId);
    }

    @Override
    public int update(GoodsInfo t) {
        return goodsInfoMapper.updateById(t);
    }

    @Override
    public int add(GoodsInfo goodsInfo) {
        return goodsInfoMapper.insert(goodsInfo);
    }


}
